package org.yl.db_core;

import org.yl.db_core.config.DemoProperties;
import org.yl.db_core.utils.db.CreateMysqlBeanUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.context.properties.EnableConfigurationProperties;

//自定义属性 properties
@EnableConfigurationProperties({DemoProperties.class})
public class CreateJavaBean {

    @Autowired
    private DemoProperties properties = new DemoProperties();

    public void init() {
       /* String  databasename = "";
        String  tablename = "yl_user_info";
        String  packageOutPath = "com.yl.db_core.model";
        String  authorName = "yanglin";
        String  projectName = "db_core";
        String  url = "jdbc:mysql://localhost:3306/shiro?useUnicode=true&characterEncoding=utf-8";
        String  name = "root";
        String  pwd = "admin";
        if (StringUtils.isEmpty(databasename)){
            properties.setTablename(tablename);
        }else {
            properties.setTablename(databasename);
        }
        properties.setPackageOutPath(packageOutPath);
        properties.setAuthorName(authorName);
        properties.setProjectName(projectName);
        properties.setUrl(url);
        properties.setName(name);
        properties.setPwd(pwd);
        CreateMysqlBeanUtil createMysqlBeanUtil = new CreateMysqlBeanUtil();
        createMysqlBeanUtil.start();*/
    }

    public static void main(String[] args) {
        new CreateJavaBean().init();
    }
}
